#ifndef PKGFRAME_PROJECT_H
#define PKGFRAME_PROJECT_H

#include <QWidget>
#include "pkgframe/pkgframe.h"
#include "key.h"
#include <QDropEvent>

QT_BEGIN_NAMESPACE
namespace Ui { class pkgframe_project; }
QT_END_NAMESPACE

class pkgframe_project : public QWidget
{
    Q_OBJECT

public:
    pkgframe_project(QWidget *parent = nullptr);
    ~pkgframe_project();

public slots:
    void test1();
    void test2();
    void openFiles();
    void keyManagerClose();
    void keyManagerOpen();
    void keyManagerChange();
    void readPackageSlot();
    void outputPackageSlot();
    void packageSlot();

private:
    Ui::pkgframe_project *ui;
    struct package_frame pkgf;
    QVector<class keyinfo> kinfo;
    key *key_manager;
    bool key_change_flag;
    struct package_frame pak;

    void keyinit();
    int tableWeightAddRow(QStringList data = QStringList());
    int tableWeightRemoveRow(int row);
    QList<int> getTableWeightSelectRows();


protected:
    void dragEnterEvent(QDragEnterEvent *event);
    void dragMoveEvent(QDragMoveEvent *event);
    void dropEvent(QDropEvent *event);
};
#endif // PKGFRAME_PROJECT_H
